const path = require('path');

const resolve = dir => path.join(__dirname, dir);

const BASE_URL = process.env.NODE_ENV === 'production' ? '/vue-admin' : '/';

module.exports = {
	lintOnSave: false,
	publicPath: BASE_URL,
	chainWebpack: config => {
		config.resolve.alias
			.set('@', resolve('src')) // @ 代替 src 目录
			.set('_c', resolve('src/components'))
	},
	// 打包时不生成.map文件，减少打包体积，加快打包速度
	productionSourceMap: false,
	// 跨域问题
	devServer: {
		// port:3001,
		// 代理域名
		proxy:'http://localhost:3000'
	}
};
